﻿
#include <stdio.h>
#include "StdAfx.h"
#include <stdlib.h>

#include <windows.h>

#include "BaseMap.h"
#include "MoveSnake.h"


void init();

int _tmain(int argc, _TCHAR* argv[])
{		
	
	init(); // Snake initialization.
	MapImage();

	while(1)
	{
		if(state != 0)
		{
			Sleep(1000);
			HeadMove();
		}
		if(state == 0)
		{
			GameOverImage();
			return 0;
		}
	}
	return 0;
}
void init()
{	

	g_pSnakeT=CreateSnake(17,10);
	g_pSnakeH = g_pSnakeT;

	g_pSnakeT=CreateSnake(16,10);
	g_pSnakeH->pNextNode = g_pSnakeT;


}
